import React from 'react';
// 引入头部导航组件
import Mynavbar from '@/components/Mynavbar';
// 引入表单登录组件
import Myform from '@/components/Myform';
// 引入antd-mobile
import { Card } from 'antd-mobile';
import { RightOutline } from 'antd-mobile-icons'
// 引入路由hooks
import { useHistory } from 'react-router-dom';



const Login = () => {
    const his = useHistory()
    const onHeaderClick = () => {
        // console.log('header');
        // 跳转到注册页
        his.push('/regist')
    }
    return (
        <div style={{
            background: '#f6f6f6',
            height: '100%'
        }}>
            {/*头部导航部分 */}
            <Mynavbar isshow={false}>京东登录</Mynavbar>
            {/* 登录表单 */}
            <Myform></Myform>
            {/* 注册 */}
            <p style={{
                margin: '10px 20px',
            }}>去注册</p>
            <Card
                title={
                    <div style={{ fontWeight: 'normal' }}>
                        快速注册
                    </div>
                }
                extra={<RightOutline />}
                onHeaderClick={onHeaderClick}
                style={{ borderRadius: '16px', margin: '0px 20px', boxSizing: 'border-box' }}
            ></Card>
        </div>
    );
}

export default Login;
